import request from '@/utils/request';

// 获取航站下拉列表
export async function selectCityInfo(params) {
  return request('/luggage/h5/pkg/mobile/getSelectCityInfo', {
    method: 'get',
    params,
  })
}

// 获取行李信息
export async function getPkgDetailInfo(params) {
  return request('/luggage/pkgDetail/getPkgDetailInfo', {
    method: 'get',
    params,
  })
}

// 创建异常行李事故单
export async function createUnderchargeAccident(data) {
  return request('/luggage/h5/pkg/mobile/savePkgInfo', {
    method: 'post',
    data,
  })
}

// 修改异常行李事故单（包含作废）
export async function updateUnderchargeAccident(data) {
  return request('/luggage/pkg/updateAccident', {
    method: 'post',
    data,
  })
}

// 转破损、内物缺失
export async function turnToDamageOrLost(data) {
  return request('/luggage/pkg/undercharge/turnToDamageOrLost', {
    method: 'post',
    data,
  })
}

// PC端获取事故单完整详情
export async function getPkgAccidentDetail(params) {
  return request('/luggage/pkg/getPkgAccidentDetail', {
    method: 'get',
    params,
  })
}

// 导入
export function upload(data) {
  return request('/uploadAndDownload/upload', {
    method: 'POST',
    data
  });
}

// 获取登录用户所属航站
export async function getUserServiceCity() {
  return request('/luggage/pkgManage/getUserServiceCity', {
    method: 'get',
  });
}
